﻿<UserControl x:Class="SD.Shapes.Samples.DragDrop.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:sd="http://schemas.silverdiagram.net/sd/2010/xaml"
    xmlns:shapesBasic="clr-namespace:SD.Shapes.Templates.Basic;assembly=SD.Shapes.Templates.Basic"
    mc:Ignorable="d"
    d:DesignHeight="600" d:DesignWidth="800">

    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="150" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        
        <ScrollViewer VerticalScrollBarVisibility="Visible">
            <ItemsControl>
                <StackPanel HorizontalAlignment="Center" Margin="10">
                    <sd:ShapeDragSource Margin="4">
                        <shapesBasic:Ellipse Width="70" Height="70" Background="LightCoral" />
                    </sd:ShapeDragSource>
                    <TextBlock Text="Ellipse" TextAlignment="Center" />
                </StackPanel>
                
                <StackPanel HorizontalAlignment="Center" Margin="10">
                    <sd:ShapeDragSource Margin="4">
                        <shapesBasic:Octagon Width="70" Height="70" Background="LightGoldenrodYellow" />
                    </sd:ShapeDragSource>
                    <TextBlock Text="Octagon" TextAlignment="Center" />
                </StackPanel>

                <StackPanel HorizontalAlignment="Center" Margin="10">
                    <sd:ShapeDragSource Margin="4">
                        <shapesBasic:Star Width="70" Height="70" Background="LightGreen" />
                    </sd:ShapeDragSource>
                    <TextBlock Text="Star" TextAlignment="Center" />
                </StackPanel>

                <StackPanel HorizontalAlignment="Center" Margin="10">
                    <sd:ShapeDragSource Margin="4">
                        <shapesBasic:Rhombus Width="70" Height="70" Background="LightBlue" />
                    </sd:ShapeDragSource>
                    <TextBlock Text="Rhombus" TextAlignment="Center" />
                </StackPanel>
            </ItemsControl>
        </ScrollViewer>

        <ScrollViewer Margin="5,0,0,0" Grid.Column="1" VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Visible" Background="#EEE">
            <Grid Width="700" Height="500" Background="White" Margin="20">
                <sd:GridRenderer Margin="10" />

                <sd:DiagramDropTarget>
                    <sd:Diagram Background="Transparent" />
                </sd:DiagramDropTarget>
            </Grid>
        </ScrollViewer>
    </Grid>
</UserControl>
